package com.example.controller;

import com.example.dao.TeacherMapper;
import com.example.entity.Teacher;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("teacher")
public class TeacherController {
    @Resource
    private TeacherMapper teacherMapper;
    @GetMapping("all")
    public List<Teacher> all(){
        return teacherMapper.selectByExample(null);
    }
}
